import __00SetRelation as sr
import _00SetFunc as ss

#构建拟序集合
n=4
R=ss.powerset(range(n))
R=sorted(R)
Pq=sr.powerindexquasiorder(R)
H=sr.HasseDiagram(range(len(R)),Pq)
ss.drawgraph(Pq)
ss.drawgraph(H)
print("R",R)
print("len(Pq)",len(Pq),"Pq",Pq)